<script setup lang="ts">
import useDialog from '@/hooks/useDialog';
import { adjustWebSocketUrl } from '@/utils/adjustWebSocketUrl';
const props = defineProps(['alarmWorkOrderUrl']);
const { visible, title, openDialog, closeDialog } = useDialog({ title: '预警工单' });
defineExpose({
  open: openDialog,
  close: closeDialog
});
const alarmWorkOrderUrl = computed(() => {
  return adjustWebSocketUrl(props.alarmWorkOrderUrl, '100.90.131.77:80');
});
console.log('alarmWorkOrderUrl', alarmWorkOrderUrl.value);
</script>

<template>
  <el-dialog v-model="visible" :title="title" :draggable="true" width="60%" append-to-body :before-close="closeDialog" :modal="false">
    <iframe :src="alarmWorkOrderUrl" style="width: 100%; height: 70vh" v-if="visible"></iframe>
  </el-dialog>
</template>

<style scoped lang="scss"></style>
